<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>The IntlIterator class</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="class.intlexception.html">« IntlException</a></li>
      <li style="float: right;"><a href="intliterator.current.html">IntlIterator::current »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="book.intl.html">intl</a></li>
    <li>The IntlIterator class</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="class.intliterator" class="reference">

 <h1 class="title">The IntlIterator class</h1>
 

 <div class="partintro"><p class="verinfo">(PHP 5 &gt;= 5.5.0, PHP 7, PHP 8)</p>


  <div class="section" id="intliterator.intro">
   <h2 class="title">简介</h2>
   <p class="para">
    This class represents iterator objects throughout the intl extension
    whenever the iterator cannot be identified with any other object provided
    by the extension. The distinct iterator object used internally by the
    <a href="control-structures.foreach.html" class="link"><code class="literal">foreach</code>
    construct</a> can only be obtained (in the relevant part here) from
    objects, so objects of this class serve the purpose of providing the hook
    through which this internal object can be obtained. As a convenience, this
    class also implements the <span class="classname"><a href="class.iterator.html" class="classname">Iterator</a></span> interface,
    allowing the collection of values to be navigated using the methods
    defined in that interface. Both these methods and the internal iterator
    objects provided to <code class="literal">foreach</code> are backed by the same
    state (e.g. the position of the iterator and its current value).
   </p>
   <p class="para">
    Subclasses may provide richer functionality.
   </p>
  </div>


  <div class="section" id="intliterator.synopsis">
   <h2 class="title">类摘要</h2>


   <div class="classsynopsis">
    <div class="ooclass">
     
    </div>

    <div class="classsynopsisinfo">
     <span class="ooclass">
      <span class="modifier">class</span> <strong class="classname">IntlIterator</strong>
     </span>

     <span class="oointerface"><span class="modifier">implements</span> 
       <a href="class.iterator.html" class="interfacename">Iterator</a></span> {</div>

    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 方法 */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><a href="intliterator.current.html" class="methodname">current</a></span>(): <span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="intliterator.key.html" class="methodname">key</a></span>(): <span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="intliterator.next.html" class="methodname">next</a></span>(): <span class="type"><span class="type void">void</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="intliterator.rewind.html" class="methodname">rewind</a></span>(): <span class="type"><span class="type void">void</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="intliterator.valid.html" class="methodname">valid</a></span>(): <span class="type">bool</span></div>

   }</div>


  </div>

 </div>

 


































<h2>目录</h2><ul class="chunklist chunklist_reference"><li><a href="intliterator.current.html">IntlIterator::current</a> — Get the current element</li><li><a href="intliterator.key.html">IntlIterator::key</a> — Get the current key</li><li><a href="intliterator.next.html">IntlIterator::next</a> — Move forward to the next element</li><li><a href="intliterator.rewind.html">IntlIterator::rewind</a> — Rewind the iterator to the first element</li><li><a href="intliterator.valid.html">IntlIterator::valid</a> — Check if current position is valid</li></ul>
</div>
</div></div></body></html>